//
//  TTBaseServerTool.h
//  WinesMall
//
//  Created by Isaac on 16/8/27.
//  Copyright © 2016年 Isaac. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TTBaseServerTool : NSObject

+ (void)getDictWithUrl:(NSString *)url param:(NSMutableDictionary *)param isNeedToken:(BOOL)isNeedToken resultClass:(Class)resultClass complete:(void (^)(BOOL, id, NSError *))complete;

+ (void)postDictWithUrl:(NSString *)url param:(NSMutableDictionary *)param isNeedToken:(BOOL)isNeedToken resultClass:(Class)resultClass complete:(void (^)(BOOL, id, NSError *))complete;

+ (void)getArrayWithUrl:(NSString *)url param:(NSMutableDictionary *)param isNeedToken:(BOOL)isNeedToken resultClass:(Class)resultClass complete:(void (^)(BOOL, id, NSError *))complete;

+ (void)postArrayWithUrl:(NSString *)url param:(NSMutableDictionary *)param isNeedToken:(BOOL)isNeedToken resultClass:(Class)resultClass complete:(void (^)(BOOL, id, NSError *))complete;

//上传图片
+ (void)uploadDataWithUrl:(NSString *)url param:(NSMutableDictionary *)param data:(NSData *)data resultClass:(Class)resultClass complete:(void (^)(BOOL, id, NSError *))complete;

//上传视频
+ (void)uploadVideoDataWithUrl:(NSString *)url param:(NSMutableDictionary *)param data:(NSData *)data resultClass:(Class)resultClass complete:(void (^)(BOOL, id, NSError *))complete;

//下载视频
+ (void)videoDownloadWithUrl:(NSString *)url param:(NSMutableDictionary *)param savePath:(NSString *)savePath data:(NSData *)data resultClass:(Class)resultClass complete:(void (^)(BOOL, id, NSError *))complete;

#pragma mark 判断是否是不需要登录的url
+ (BOOL)isNoLoginUrl:(NSString *)url;

@end
